--=========================================================
--供应商数据
--=========================================================
--淮矿华东物流市场有限公司
CREATE TABLE [dbo].[t_jiuqi_supplier_hdwl](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿物流朱家桥外贸码头分公司
CREATE TABLE [dbo].[t_jiuqi_supplier_zjq](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流（上海）有限公司
CREATE TABLE [dbo].[t_jiuqi_supplier_sh](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流仓储管理有限公司
CREATE TABLE [dbo].[t_jiuqi_supplier_cc](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流广州分公司
CREATE TABLE [dbo].[t_jiuqi_supplier_gz](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流杭州分公司
CREATE TABLE [dbo].[t_jiuqi_supplier_hz](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流合肥分公司
CREATE TABLE [dbo].[t_jiuqi_supplier_hf](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流江苏有限公司
CREATE TABLE [dbo].[t_jiuqi_supplier_js](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流江苏有限公司
CREATE TABLE [dbo].[t_jiuqi_supplier_km](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流联运（芜湖）有限公司
CREATE TABLE [dbo].[t_jiuqi_supplier_lywh](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流联运（芜湖）有限公司
CREATE TABLE [dbo].[t_jiuqi_supplier_ly](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流南京分公司
CREATE TABLE [dbo].[t_jiuqi_supplier_nj](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流武汉分公司
CREATE TABLE [dbo].[t_jiuqi_supplier_wh](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流有限责任公司（本部）
CREATE TABLE [dbo].[t_jiuqi_supplier_bb](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--镇江
CREATE TABLE [dbo].[t_jiuqi_supplier_zj](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--淮矿现代物流重庆分公司
CREATE TABLE [dbo].[t_jiuqi_supplier_cq](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--上海斯迪尔电子交易市场经营管理有限公司
CREATE TABLE [dbo].[t_jiuqi_supplier_sdedz](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);
--上海斯迪尔钢铁有限公司
CREATE TABLE [dbo].[t_jiuqi_supplier_sdegt](
	[code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[name] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[mnemonic_code] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[company_id] [int] NULL
);

--华东物流
update dbo.t_jiuqi_supplier_hdwl set company_id=7807;
--朱家桥
update dbo.t_jiuqi_supplier_zjq set company_id=6966;
--上海
update dbo.t_jiuqi_supplier_sh set company_id=5880;
--仓储
update dbo.t_jiuqi_supplier_cc set company_id=7789;
--广州
update dbo.t_jiuqi_supplier_gz set company_id=6189;
--杭州
update dbo.t_jiuqi_supplier_hz set company_id=5888;
--合肥
update dbo.t_jiuqi_supplier_hf set company_id=5881;
--江苏
update dbo.t_jiuqi_supplier_js set company_id=6611;
--昆明
update dbo.t_jiuqi_supplier_km set company_id=5886;
--联运芜湖
--update dbo.t_jiuqi_supplier_lywh set company_id=null;
--联运
update dbo.t_jiuqi_supplier_ly set company_id=6528;
--南京
update dbo.t_jiuqi_supplier_nj set company_id=5882;
--武汉
update dbo.t_jiuqi_supplier_wh set company_id=5885;
--本部
update dbo.t_jiuqi_supplier_bb set company_id=6185;
--镇江
update dbo.t_jiuqi_supplier_zj set company_id=5883;
--重庆
update dbo.t_jiuqi_supplier_cq set company_id=5884;
--斯迪尔电子
--update dbo.t_jiuqi_supplier_sdedz set company_id=null;
--斯迪尔钢铁
--update dbo.t_jiuqi_supplier_sdegt set company_id=null;


--华东物流
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_hdwl;
--朱家桥
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_zjq;
--上海
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_sh;
--仓储
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_cc;
--广州
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_gz;
--杭州
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_hz;
--合肥
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_hf;
--江苏
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_js;
--昆明
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_km;
--联运芜湖
--insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from dbo.t_jiuqi_supplier_lywh;
--联运
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_ly;
--南京
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_nj;
--武汉
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_wh;
--本部
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from dbo.t_jiuqi_supplier_bb;
--镇江
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from dbo.t_jiuqi_supplier_zj;
--重庆
insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_cq;
--斯迪尔电子
--insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_sdedz;
--斯迪尔钢铁
--insert into dbo.t_jiuqi_supplier(code,name,mnemonic_code,company_id,status)  select code,ltrim(rtrim(name)),mnemonic_code,company_id,'1' from  dbo.t_jiuqi_supplier_sdegt;
